<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')
			uni.onNetworkStatusChange(res => {
				if (res.isConnected) {
					this.checkNetworkType(res.networkType);
				} else {
					// 网络断开的处理逻辑
				}
			});
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		},
		methods: {
			checkNetworkType(networkType) {
				if (networkType === 'wifi') {
					console.log('当前是wifi网络');
					// 是wifi网络的处理逻辑
				} else {
					console.log('当前不是wifi网络');
					// 不是wifi网络的处理逻辑
					uni.showModal({
						title: '温馨提示',
						content: '当前非wifi，请注意流量消耗',
						confirmText: '好的'//确认按钮的文字
					})
				}
			}
		}
	}
</script>
<style lang="scss">
	/*每个页面公共css */
	@import "uview-ui/index.scss";
	@import url("static/css/main.css");
	@import url("static/css/item.css");
	/deep/.u-sticky{
		top: 0 !important;
	}
	.ssbox {
		position: relative;
		padding: 5rpx 5rpx 5rpx 30rpx;
		border-radius: 50rpx;

		.rightss {
			min-width: 150rpx;
			text-align: center;
			box-sizing: border-box;
			padding: 20rpx 40rpx;
			border-radius: 50rpx;
			color: #fff;
			font-size: 24rpx;
			background-color: #3478f5;
		}
	}
</style>